<?php

/**
 * ViviendasAlquileres form base class.
 *
 * @method ViviendasAlquileres getObject() Returns the current form's model object
 *
 * @package    costabravasfr
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormGeneratedTemplate.php 24171 2009-11-19 16:37:50Z Kris.Wallsmith $
 */
abstract class BaseViviendasAlquileresForm extends BaseFormDoctrine
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'                 => new sfWidgetFormInputHidden(),
      'nombre'             => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('AlquileresDisponibilidad'), 'add_empty' => false)),
      'alias'              => new sfWidgetFormInputText(),
      'apart_casa'         => new sfWidgetFormChoice(array('choices' => array(0 => '0', 1 => '1'))),
      'capacidad'          => new sfWidgetFormInputText(),
      'diacambio'          => new sfWidgetFormChoice(array('choices' => array('Lunes' => 'Lunes', 'Martes' => 'Martes', 'Miercoles' => 'Miercoles', 'Jueves' => 'Jueves', 'Viernes' => 'Viernes', 'Sabado' => 'Sabado', 'Domingo' => 'Domingo'))),
      'geolatitud'         => new sfWidgetFormInputText(),
      'geolongitud'        => new sfWidgetFormInputText(),
      'preciomin'          => new sfWidgetFormInputText(),
      'ranking'            => new sfWidgetFormInputText(),
      'fecha_inicio_rank'  => new sfWidgetFormDate(),
      'fecha_fin_rank'     => new sfWidgetFormDate(),
      'habitaciones'       => new sfWidgetFormInputText(),
      'banos'              => new sfWidgetFormInputText(),
      'tv'                 => new sfWidgetFormChoice(array('choices' => array('s' => 's', 'n' => 'n'))),
      'wifi'               => new sfWidgetFormChoice(array('choices' => array('s' => 's', 'n' => 'n'))),
      'satelite'           => new sfWidgetFormChoice(array('choices' => array('s' => 's', 'n' => 'n'))),
      'calefaccion'        => new sfWidgetFormChoice(array('choices' => array('s' => 's', 'n' => 'n'))),
      'aire'               => new sfWidgetFormChoice(array('choices' => array('s' => 's', 'n' => 'n'))),
      'piscina'            => new sfWidgetFormChoice(array('choices' => array(0 => '0', 1 => '1', 2 => '2'))),
      'jardin'             => new sfWidgetFormChoice(array('choices' => array(0 => '0', 1 => '1', 2 => '2'))),
      'garaje'             => new sfWidgetFormChoice(array('choices' => array(0 => '0', 1 => '1', 2 => '2'))),
      'parking'            => new sfWidgetFormChoice(array('choices' => array('s' => 's', 'n' => 'n'))),
      'vistas'             => new sfWidgetFormChoice(array('choices' => array('s' => 's', 'n' => 'n'))),
      'distplaya'          => new sfWidgetFormInputText(),
      'activo'             => new sfWidgetFormChoice(array('choices' => array('s' => 's', 'n' => 'n'))),
      'new'                => new sfWidgetFormChoice(array('choices' => array('t' => 't', 's' => 's', 'n' => 'n'))),
      'timer'              => new sfWidgetFormChoice(array('choices' => array('s' => 's', 'n' => 'n'))),
      'galeria'            => new sfWidgetFormChoice(array('choices' => array('s' => 's', 'n' => 'n'))),
      'flechas'            => new sfWidgetFormChoice(array('choices' => array('s' => 's', 'n' => 'n'))),
      'fotocomment'        => new sfWidgetFormChoice(array('choices' => array('s' => 's', 'n' => 'n'))),
      'fechacreacion'      => new sfWidgetFormDate(),
      'fechaactualizacion' => new sfWidgetFormDateTime(),
      'orderid'            => new sfWidgetFormInputText(),
      'desc_ca'            => new sfWidgetFormTextarea(),
      'desc_pre_ca'        => new sfWidgetFormTextarea(),
      'desc_brev_ca'       => new sfWidgetFormTextarea(),
      'desc_es'            => new sfWidgetFormTextarea(),
      'desc_pre_es'        => new sfWidgetFormTextarea(),
      'desc_brev_es'       => new sfWidgetFormTextarea(),
      'desc_en'            => new sfWidgetFormTextarea(),
      'desc_pre_en'        => new sfWidgetFormTextarea(),
      'desc_brev_en'       => new sfWidgetFormTextarea(),
      'desc_nl'            => new sfWidgetFormTextarea(),
      'desc_pre_nl'        => new sfWidgetFormTextarea(),
      'desc_brev_nl'       => new sfWidgetFormTextarea(),
      'desc_fr'            => new sfWidgetFormTextarea(),
      'desc_pre_fr'        => new sfWidgetFormTextarea(),
      'desc_brev_fr'       => new sfWidgetFormTextarea(),
      'palabrasinfo'       => new sfWidgetFormInputText(),
      'zona'               => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('ZonasViviendas'), 'add_empty' => true)),
    ));

    $this->setValidators(array(
      'id'                 => new sfValidatorDoctrineChoice(array('model' => $this->getModelName(), 'column' => 'id', 'required' => false)),
      'nombre'             => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('AlquileresDisponibilidad'), 'required' => false)),
      'alias'              => new sfValidatorString(array('max_length' => 20, 'required' => false)),
      'apart_casa'         => new sfValidatorChoice(array('choices' => array(0 => '0', 1 => '1'), 'required' => false)),
      'capacidad'          => new sfValidatorInteger(array('required' => false)),
      'diacambio'          => new sfValidatorChoice(array('choices' => array(0 => 'Lunes', 1 => 'Martes', 2 => 'Miercoles', 3 => 'Jueves', 4 => 'Viernes', 5 => 'Sabado', 6 => 'Domingo'), 'required' => false)),
      'geolatitud'         => new sfValidatorNumber(array('required' => false)),
      'geolongitud'        => new sfValidatorNumber(array('required' => false)),
      'preciomin'          => new sfValidatorNumber(array('required' => false)),
      'ranking'            => new sfValidatorNumber(array('required' => false)),
      'fecha_inicio_rank'  => new sfValidatorDate(array('required' => false)),
      'fecha_fin_rank'     => new sfValidatorDate(array('required' => false)),
      'habitaciones'       => new sfValidatorInteger(array('required' => false)),
      'banos'              => new sfValidatorInteger(array('required' => false)),
      'tv'                 => new sfValidatorChoice(array('choices' => array(0 => 's', 1 => 'n'), 'required' => false)),
      'wifi'               => new sfValidatorChoice(array('choices' => array(0 => 's', 1 => 'n'), 'required' => false)),
      'satelite'           => new sfValidatorChoice(array('choices' => array(0 => 's', 1 => 'n'), 'required' => false)),
      'calefaccion'        => new sfValidatorChoice(array('choices' => array(0 => 's', 1 => 'n'), 'required' => false)),
      'aire'               => new sfValidatorChoice(array('choices' => array(0 => 's', 1 => 'n'), 'required' => false)),
      'piscina'            => new sfValidatorChoice(array('choices' => array(0 => '0', 1 => '1', 2 => '2'), 'required' => false)),
      'jardin'             => new sfValidatorChoice(array('choices' => array(0 => '0', 1 => '1', 2 => '2'), 'required' => false)),
      'garaje'             => new sfValidatorChoice(array('choices' => array(0 => '0', 1 => '1', 2 => '2'), 'required' => false)),
      'parking'            => new sfValidatorChoice(array('choices' => array(0 => 's', 1 => 'n'), 'required' => false)),
      'vistas'             => new sfValidatorChoice(array('choices' => array(0 => 's', 1 => 'n'), 'required' => false)),
      'distplaya'          => new sfValidatorNumber(array('required' => false)),
      'activo'             => new sfValidatorChoice(array('choices' => array(0 => 's', 1 => 'n'), 'required' => false)),
      'new'                => new sfValidatorChoice(array('choices' => array(0 => 't', 1 => 's', 2 => 'n'), 'required' => false)),
      'timer'              => new sfValidatorChoice(array('choices' => array(0 => 's', 1 => 'n'), 'required' => false)),
      'galeria'            => new sfValidatorChoice(array('choices' => array(0 => 's', 1 => 'n'), 'required' => false)),
      'flechas'            => new sfValidatorChoice(array('choices' => array(0 => 's', 1 => 'n'), 'required' => false)),
      'fotocomment'        => new sfValidatorChoice(array('choices' => array(0 => 's', 1 => 'n'), 'required' => false)),
      'fechacreacion'      => new sfValidatorDate(array('required' => false)),
      'fechaactualizacion' => new sfValidatorDateTime(),
      'orderid'            => new sfValidatorInteger(array('required' => false)),
      'desc_ca'            => new sfValidatorString(array('required' => false)),
      'desc_pre_ca'        => new sfValidatorString(array('required' => false)),
      'desc_brev_ca'       => new sfValidatorString(array('required' => false)),
      'desc_es'            => new sfValidatorString(array('required' => false)),
      'desc_pre_es'        => new sfValidatorString(array('required' => false)),
      'desc_brev_es'       => new sfValidatorString(array('required' => false)),
      'desc_en'            => new sfValidatorString(array('required' => false)),
      'desc_pre_en'        => new sfValidatorString(array('required' => false)),
      'desc_brev_en'       => new sfValidatorString(array('required' => false)),
      'desc_nl'            => new sfValidatorString(array('required' => false)),
      'desc_pre_nl'        => new sfValidatorString(array('required' => false)),
      'desc_brev_nl'       => new sfValidatorString(array('required' => false)),
      'desc_fr'            => new sfValidatorString(array('required' => false)),
      'desc_pre_fr'        => new sfValidatorString(array('required' => false)),
      'desc_brev_fr'       => new sfValidatorString(array('required' => false)),
      'palabrasinfo'       => new sfValidatorString(array('max_length' => 255, 'required' => false)),
      'zona'               => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('ZonasViviendas'), 'required' => false)),
    ));

    $this->widgetSchema->setNameFormat('viviendas_alquileres[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    $this->setupInheritance();

    parent::setup();
  }

  public function getModelName()
  {
    return 'ViviendasAlquileres';
  }

}
